1. Field of the Invention
The present invention relates to a data communication system and a data communication method for controlling data communications between computers interconnected through a network.
2. Description of Related Art
FIG. 12 is a block diagram showing a conventional data communication system, in which the reference numeral 1 designates a network structured using Ethernet or FastEthernet; 2 and 3 each designate an operator station (OPS) that exchange message communications or the like with a host computer 4 and controllers 5 and 6; 4 designates the host computer that exchanges message communications or the like with the operator stations 2 and 3 or controllers 5 and 6; and 5 and 6 each designate the controller that exchange message communications or the like with the operator stations 2 and 3 or the host computer 4.
Next, the operation of the conventional data communication system will be described.
Although the host computer 4, operator stations 2 and 3 and the like interconnected through the network 1 exchange message communications with each other, if a message collision occurs on the network 1, problems arise in that the messages are delayed or suffer a loss.
To avoid the collision on the network 1, the conventional system employs a token passing method which allows the host computer 4 and the like to transmit only when they acquire the token.
Besides the foregoing conventional system, Japanese patent application laid-open No. 8-180006/1996 discloses a technique that allots, to computers interconnected through a network, transmission time slots that enable message transmission, thereby preventing a plurality of computers from sending messages to the network in the same time slot. However, if the computer that manages the transmission time slots halts owing to a failure, it becomes impossible for other computers to send messages.
With the foregoing configurations, the conventional data communication systems have a problem in that although they can avoid the message collision on the network 1, if the host computer 4 that acquires the token suffers a breakdown or loses the token, it becomes impossible for the operator system 2 or the like connected to the network 1 to continue subsequent message transmission.
Incidentally, it will be possible to restart the transmission of messages by adding a complicated mechanism for detecting the loss of the token to retransmit the messages, in which case a problem still remains in that the operator system 2 or the like cannot transmit the messages until the new token is issued.
The present invention is implemented to solve the foregoing problems. It is therefore an object of the present invention to provide a data communication system and a data communication method capable of reducing the delay or loss rate of messages involved in message collisions, and enabling the other computers to transmit even if some computer suffers a failure.
According to a first aspect of the present invention, there is provided a data communication system including an internal computer connected with one or more external computers through a network, the data communication system comprising: memory means for storing a first information amount that each of the external computers can receive in a communication cycle; storing means for storing a second information amount that is transmitted to each of the external computers in the communication cycle; addition means for adding, when transmitted data to one of the external computers is placed in a transmission queue, an information amount of the transmitted data to the second information amount which is stored in the storing means and is associated with the one of the external computers; and transmission means for transmitting the transmitted data to the one of the external computers only if the addition result of the addition means does not exceed the first information amount that the one of the external computers can receive. This offers an advantage of being able to reduce the delay or loss rate of a message, and to enable other computers to transmit messages even if some computer suffers a failure.
Here, the memory means may store a third information amount that the internal computer can transmit in the communication cycle; the storing means may store a fourth information amount that the internal computer transmits in the communication cycle; and the addition means may add, when transmitted data is placed in a transmission queue, an information amount of the transmitted data to the fourth information amount stored in the storing means, and wherein the data communication system may further comprise:
inhibiting means for inhibiting transmission of the transmitted data to the external computers if the addition result of the addition means exceeds the third information amount. This offers an advantage of being able to prevent transmitted data that exceeds the transmission capability of the operating system of the transmitting end from being requested, thereby enabling the computer of the transmitting end to smoothly carry out processings other than the transmission processing.
The memory means may store a maximum receivable information amount that each of the external computers assigns to the internal computer. This offers an advantage of being able to prevent the internal computer from transmitting data that exceeds the receiving capability of the external computer even when the external computer receives data from other external computers.
The first information amount and the second information amount may be each represented in terms of a number of data.
The first information amount, the second information amount, the third information amount and the fourth information amount may be each represented in terms of a number of data.
The first information amount and the second information amount may be each represented in terms of a number of packets.
The first information amount, the second information amount, the third information amount and the fourth information amount may be each represented in terms of a number of packets.
The transmission means may retransmit, if an acknowledge signal is not sent back over a predetermined time period from one of the external computers to which the transmission means transmits transmitted data, the transmitted data to the one of the external computers.
The transmission means may halt its retransmission of the transmitted data if a number of times of the retransmissions reaches a predetermined upper limit.
The data communication system may further comprise saving means for saving, when the transmitted data is divided into packets and a header of each of the packets is overwritten on a part of the transmitted data, the part of the transmitted data into a save area, and for restoring the part of the transmitted data to its original area after transmitting a current packet including the header which is overwritten on the original area.
According to a second aspect of the present invention, there is provided a data communication method of a system including an internal computer connected with one or more external computers through a network, the data communication method comprising the steps of: storing a first information amount that each of the external computers can receive in a communication cycle; storing a second information amount that is transmitted to each of the external computers in the communication cycle; adding, when transmitted data to one of the external computers is placed in a transmission queue, an information amount of the transmitted data to the second information amount which is associated with the one of the external computers; and transmitting the transmitted data to the one of the external computers only if the addition result does not exceed the first information amount that the one of the external computers can receive.
Here, the data communication method may further comprise the steps of: storing a third information amount that the internal computer can transmit in the communication cycle; storing a fourth information amount that the internal computer transmits in the communication cycle; and adding, when transmitted data is placed in a transmission queue, an information amount of the transmitted data to the fourth information amount; and inhibiting transmission of the transmitted data to the external computers if the addition result exceeds the third information amount.
The first information amount and the second information amount may be each represented in terms of a number of data.
The first information amount, the second information amount, the third information amount and the fourth information amount may be each represented in terms of a number of data.
The first information amount and the second information amount may be each represented in terms of a number of packets.
The first information amount, the second information amount, the third information amount and the fourth information amount may be each represented in terms of a number of packets.